home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1172 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: ix.netcom.com!netnews
  2. From: Nicholas Paldino <np1010@cnsunix.albany.edu>
  3. Newsgroups: comp.lang.c
  4. Subject: HELP NEEDED:  Passing input to an already running program.
  5. Date: Thu, 11 Jan 1996 17:56:06 -0800
  6. Organization: Netcom
  7. Message-ID: <30F5BFB6.75CF@cnsunix.albany.edu>
  8. NNTP-Posting-Host: ix-nyc19-12.ix.netcom.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-NETCOM-Date: Thu Jan 11  3:01:02 PM PST 1996
  13. X-Mailer: Mozilla 2.0b5 (Win95; I; 16bit)
  14.  
  15. I posted this about a day ago with no response.  I am a little anxious to 
  16. get this problem solved.
  17.  
  18. I am writing an application that will "launch" another program called 
  19. irc.  The problem is I need to pass input to irc once I invoke it from 
  20. the original program.  IRC will be invoked using the funtion system().  
  21. Once irc is called it takes input from the keyboard.  This is what I have 
  22. tried so far:
  23.  
  24. -> Using fprintf(stdin, ".....");
  25. I thought that if I wrote to the stdin file, it would be passed to IRC as 
  26. input from the keyboard.  This didn't work.
  27.  
  28. -> Using system("...");
  29. This didn't work either.  it just passed commands to the shell that IRC 
  30. was running from.
  31.  
  32. -> Redirecting input using the system("irc < input.file")
  33. This worked and inputted the commands that were contained in input.file 
  34. but afterwards the IRC program frose on me and would not accept input 
  35. anymore.
  36.  
  37. Can anyone help me here?  I would apprecate any help that can be offered.
  38.  
  39.                 - Nicholas Paldino
  40.                 - np1010@cnsunix.albany.edu
  41.